/**
 * @(#) YearAdjustmentFacade.as 
 *
 * @date		2009. 04. 20.
 * @version		1.0
 * @author		Jo, ChangHun
 * @description	Application Facade
 * 				mvc간 주고 받는 메세지를 정의하고,  command를 등록한다. 
 */
package com.skt.common_hr.yearadjustment
{
	
	import com.skt.common_hr.yearadjustment.controller.StartupCommand;
	
	import flash.display.DisplayObject;
	
	import org.puremvc.as3.multicore.interfaces.IFacade;
	import org.puremvc.as3.multicore.patterns.facade.Facade;
	
	public class YearAdjustmentFacade extends Facade implements IFacade
	{
		// Notification constants 
		public static const STARTUP:String 								= 'startup';
		public static const CLOSE_MODULE:String							= 'closeModule';
		public static const RELOAD_BASIC_DATA:String					= 'reloadBasicData';
		public static const LOAD_MAINLIST_COMPLETE:String				= 'loadMainlistComplete';
		public static const LOAD_MAINLIST_FAILED:String					= 'loadMainlistFailed';
		public static const SAVE_MAINDATA_COMPLETE:String				= 'saveMainlistComplete';
		public static const SAVE_MAINDATA_FAILED:String					= 'saveMainlistFailed';
		public static const LOAD_TOTALINCOM_AREA_COMPLETE:String		= 'loadTotalincomAreaComplete';
		public static const LOAD_TOTALINCOM_AREA_FAILED:String			= 'loadTotalincomAreaFailed';

		public static const LOAD_PRE_FAMILY_COMPLETE:String				= 'loadPreFamilyComplete';
		public static const LOAD_PRE_FAMILY_FAILED:String				= 'loadPreFamilyFailed';
		public static const LOAD_PREMIUM_LIST_COMPLETE:String			= 'loadPremiumListComplete';
		public static const LOAD_PREMIUM_LIST_FAILED:String				= 'loadPremiumListFailed';
		public static const SAVE_PREMIUM_LIST_COMPLETE:String			= 'savePremiumListComplete';
		public static const SAVE_PREMIUM_LIST_FAILED:String				= 'savePremiumListFailed';
		public static const LOAD_MEDICAL_LIST_COMPLETE:String			= 'loadMedicalListComplete';
		public static const LOAD_MEDICAL_LIST_FAILED:String				= 'loadMedicalListFailed';
		public static const SAVE_MEDICAL_LIST_COMPLETE:String			= 'saveMedicalListComplete';
		public static const SAVE_MEDICAL_LIST_FAILED:String				= 'saveMedicalListFailed';
		public static const LOAD_EDU_LIST_COMPLETE:String				= 'loadEduListComplete';
		public static const LOAD_EDU_LIST_FAILED:String					= 'loadEduListFailed';
		public static const SAVE_EDU_LIST_COMPLETE:String				= 'saveEduListComplete';
		public static const SAVE_EDU_LIST_FAILED:String					= 'saveEduListFailed';
		public static const LOAD_OTHER_LIST_COMPLETE:String				= 'loadOtherListComplete';
		public static const LOAD_OTHER_LIST_FAILED:String				= 'loadOtherListFailed';
		public static const SAVE_OTHER_LIST_COMPLETE:String				= 'saveOtherListComplete';
		public static const SAVE_OTHER_LIST_FAILED:String				= 'saveOtherListFailed';
		
		public static const LOAD_EDUGUBUNCOMBO_COMPLETE:String			= 'loadEdugubuncomboComplete';
		public static const LOAD_EDUGUBUNCOMBO_FAILED:String			= 'loadEdugubuncomboFailed';
		public static const LOAD_CULTRESULT_COMPLETE:String				= 'loadCultresultComplete';
		public static const LOAD_CULTRESULT_FAILED:String				= 'loadCultresultFailed';
		public static const LOAD_SIMULRESULT_COMPLETE:String			= 'loadSimulresultComplete';
		public static const LOAD_SIMULRESULT_FAILED:String				= 'loadSimulresultFailed';
		public static const LOAD_COMBO_GUBUN_COMPLETE:String			= 'loadComboGubunComplete';
		public static const LOAD_COMBO_GUBUN_FAILED:String				= 'loadComboGubunFailed';
		public static const SAVE_TOTALINCOM_AREA_COMPLETE:String		= 'saveTotalincomAreaComplete';
		public static const SAVE_TOTALINCOM_AREA_FAILED:String			= 'saveTotalincomAreaFailed';
		public static const LOAD_BASIC_SUBTRACTIONCNT_COMPLETE:String	= 'loadBasicSubtractioncntComplete';
		public static const LOAD_BASIC_SUBTRACTIONCNT_FAILED:String		= 'loadBasicSubtractioncntFailed';
		public static const LOAD_DEPENDENT_FAMILY_COMPLETE:String		= 'loadDependentFamilyComplete';
		public static const LOAD_DEPENDENT_FAMILY_FAILED:String			= 'loadDependentFamilyFailed';
		public static const LOAD_DONATION_LIST_COMPLETE:String			= 'loadDonationListComplete';
		public static const LOAD_DONATION_LIST_FAILED:String			= 'loadDonationListFailed';
		public static const SAVE_DONATION_LIST_COMPLETE:String			= 'saveDonationListComplete';
		public static const SAVE_DONATION_LIST_FAILED:String			= 'saveDonationListFailed';
		public static const SAVE_DEPENDENT_FAMILY_COMPLETE:String		= 'saveDependentFamilyComplete';
		public static const SAVE_DEPENDENT_FAMILY_FAILED:String			= 'saveDependentFamilyFailed';
		public static const LOAD_BASICINFO_COMPLETE:String				= 'loadBasicinfoComplete';
		public static const LOAD_BASICINFO_FAILED:String				= 'loadBasicinfoFailed';
		public static const LOAD_COMBO_FAMILY_COMPLETE:String			= 'loadComboFamilyComplete';
		public static const LOAD_COMBO_FAMILY_FAILED:String				= 'loadComboFamilyFailed';
		//부양가족 유형
		public static const LOAD_COMBO_FAMILY_TYPE_COMPLETE:String			= 'loadComboFamilyTypeComplete';
		public static const LOAD_COMBO_FAMILY_TYPE_FAILED:String			= 'loadComboFamilyTypeFailed';
		public static const LOAD_ANNUITY_SUBTRATION_COMPLETE:String			= "loadComboAnnuitySubtractionComplete";
		public static const LOAD_ANNUITY_SUBTRATION_FAILED:String			= "loadComboAnnuitySubtractionFailed";
		public static const LOAD_ANNUITY_TYPE_LIST_COMPLETE:String			= "loadComboAnnuityTypeListComplete";
		public static const LOAD_ANNUITY_TYPE_LIST_FAILED:String			= "loadComboAnnuityTypeListFailed";
		public static const SAVE_ANNUITY_SUBTRATION_COMPLETE:String			= "saveComboAnnuitySubtractionComplete";
		public static const SAVE_ANNUITY_SUBTRATION_FAILED:String			= "saveComboAnnuitySubtractionFailed";
		
		public static const LOAD_COMBO_INHAB_COMPLETE:String			= 'loadComboInhabComplete';
		public static const LOAD_COMBO_INHAB_FAILED:String				= 'loadComboInhabFailed';
		public static const LOAD_COMBO_DONAINHAB_COMPLETE:String		= 'loadComboDonainhabComplete';
		public static const LOAD_COMBO_DONAINHAB_FAILED:String			= 'loadComboDonainhabFailed';
//shgoo 2010.01.11
		//사업자 등록 번호 유효성 체크 
		public static const LOAD_BIZ_NUM_VALID_COMPLETE:String			= 'loadBizNumValidComplete';
		public static const LOAD_BIZ_NUM_VALID_FAILED:String			= 'loadBizNumValidFailed'; 
////////////		
//shgoo 2010.01.14
		//소득공제 신고서 출력 데이타 
		public static const LOAD_INCOME_REPORT_COMPLETE:String			= 'loadIncomeReportComplete';
		public static const LOAD_INCOME_REPORT_FAILED:String			= 'loadIncomeReportFailed';
////////////		
//shgoo 2010.01.17
		//신용카드 소득공제신청서  데이타 
		public static const LOAD_CREDIT_CARD_REPORT_COMPLETE:String		= 'loadCreditCardReportComplete';
		public static const LOAD_CREDIT_CARD_REPORT_FAILED:String		= 'loadCreditCardReportFailed';
////////////		
//shgoo 2010.01.18
		//기부금 명세서  데이타 
		public static const LOAD_DONATION_REPORT_COMPLETE:String		= 'loadDonationReportComplete';
		public static const LOAD_DONATION_REPORT_FAILED:String			= 'loadDonationReportFailed';
		//의료비지급명세서  데이타 
		public static const LOAD_MEDICAL_REPORT_COMPLETE:String			= 'loadMedicalReportComplete';
		public static const LOAD_MEDICAL_REPORT_FAILED:String			= 'loadMedicalReportFailed';
////////////	
		//2012.01.03 jt 유형선택 추가
		public static const LOAD_COMBO_TYPE_COMPLETE:String			= 'LOAD_COMBO_TYPE_COMPLETE';
		public static const LOAD_COMBO_TYPE_FAILED:String			= 'LOAD_COMBO_TYPE_FAILED';
///////////	

		public static const LOAD_PRESENT_REPORT_COMPLETE:String			= 'loadPresentReportComplete';
		public static const LOAD_PRESENT_REPORT_FAILED:String			= 'loadPresentReportFailed';


		//[dev5]
		//new 신용카드 사용내역 관련
		public static const LOAD_COMBO_CREDITINHAB_COMPLETE:String		= "loadComboCreditinhabComplete";
		public static const LOAD_COMBO_CREDITINHAB_FAILED:String		= "loadComboCreditinhabFailed";
		
		public static const LOAD_CREDITCARD2_LIST_COMPLETE:String		= 'loadCreditCard2ListComplete';
		public static const LOAD_CREDITCARD2_LIST_FAILED:String			= 'loadCreditCard2ListFailed';
		
		public static const SAVE_CREDITCARD2_LIST_COMPLETE:String		= 'saveCreditCard2ListComplete';
		public static const SAVE_CREDITCARD2_LIST_FAILED:String			= 'saveCreditCard2ListFailed';
		//[/dev5]
		
		
		
		public static const DETAIL_VIEW:String							= 'detailView';
		public var app:DisplayObject;
		
		public function YearAdjustmentFacade( key:String )
		{ 
			super(key);	
		}
		
        /**
         * Singleton ApplicationFacade Factory Method
         */
        public static function getInstance( key:String ) : YearAdjustmentFacade 
        {
            if ( instanceMap[ key ] == null ) instanceMap[ key ] = new YearAdjustmentFacade( key );
            return instanceMap[ key ] as YearAdjustmentFacade;
        }

        /**
         * Register Commands with the Controller 
         *     - parent 클래스의 생성자에서 자동으로 호출됨
         */
        override protected function initializeController( ) : void {
            super.initializeController();            
            registerCommand( STARTUP, StartupCommand);
        }
       
        /**
         * Module의 시작점으로 YearAdjustment.mxml의 creationComplete 이벤트에서 호출한다.
         *     
         */
        public function startup(app:Object) :void 
        {
        	trace("send startup in yearAdjustment");
        	this.app = app as DisplayObject;
        	
            sendNotification( STARTUP, app );
        }
	}
}